package org.gbis.openbus.db;

import java.sql.*;

import org.gbis.openbus.*;

import com.sbmoon.db.*;
import com.sbmoon.web.Request;

public class DbManagerRouteBus extends DbManager {

	@Override
	public String getSqlFileName() {
		return "sql400_routeBusSearch.sql";
	}

	@Override
	public Item getItem(QueryResult qr) {
		RouteBus routeBus = new RouteBus();

		routeBus.setPlateNo( qr.getString("plateNo"));
		routeBus.setStationId(qr.getString("passedStationId"));
		routeBus.setLowPlate(qr.getString("LOW_PLATE"));


		return routeBus;
	}

	private DbManagerRouteBus() {
	}

	public static DbManagerRouteBus getDbManager() {
		if( true ) {
			return new DbManagerRouteBus();
		}
		return dbManager;
	}

	private static final DbManagerRouteBus dbManager = new DbManagerRouteBus();

	public static void main(String[] args) throws Exception {

		SearchResult searchResult = SearchResult.getNewSearchResult();

		getDbManager().getSearchResult( true, searchResult , "200000150" );

	}

}